<?php
class Index extends Controller {
	public function html() {
		$id = $this->get('id', 'int');
		if(!$id) header("Localhost:/product/category/");
		 
		$mProduct = new Product_model();
		$data['product'] = $mProduct->productInfo(array('id' => $id));
		
		//获取图片信息
		$mPicture = new Picture_model();
		$params = array('pid' => $id);
		$picture = $mPicture->picture($params);
		$data['picture'] = $picture;
		
		//获取门票信息
		$mTicket = new Ticket_model();
		$params = array('product_id' => $id, 'is_deleted' => 0, 'status' => 0);
		$data['ticket'] = $mTicket->ticket($params);
		
		$tpl = 'deal/index.html';
		$this->display($data, $tpl);
	}
}